  public function executeIndex(sfWebRequest $request)
  {
    // sorting
    if ($request->getParameter('sort'))
    {
      $this->setSort(array($request->getParameter('sort'), $request->getParameter('sort_type')));
    }

    // pager
    if ($request->getParameter('page'))
    {
      $this->setPage($request->getParameter('page'));
    }

    // pager max per page
    if (($mvalue = intval($request->getParameter('max_per_page'))) > 0)
    {
      if ($mvalue > $this->configuration->getPagerMaxAllowedPerPage())
      {
        $this->getUser()->setFlash('notice', "Value is too high. Setted to maximum allowed.");
        $mvalue = $this->configuration->getPagerMaxAllowedPerPage();
      }
      $this->configuration->setPagerMaxPerPage($mvalue);
    }
    elseif (!is_null($request->getParameter('max_per_page')))
    {
      $this->getUser()->setFlash('error', 'Please, enter an integer value greather than 0.');
    }

<?php if ($this->configuration->hasCart()): ?>
    $this->cartMerge();
<?php endif ?>
    $this->pager = $this->getPager();
    $this->sort = $this->getSort();
<?php if ($this->configuration->hasCart()): ?>
    $this->cart_objects = $this->configuration->getCartItemsAsObjects();
<?php endif ?>
  }
